Repository navigation
Conversation
Swap the Ionic Storage wrapper for Capacitor Preferences in the user service, tutorial page, tutorial route guard and app component. Keys are unchanged; booleans are now stored as the string 'true'. Drop the IonicStorageModule bootstrap, the @ionic/storage packages and the localforage CommonJS allow-list entry, and register the native plugin via cap sync. Unit specs cover the login, tutorial and guard flows against the real Preferences web implementation. Closes FW-6671, relates to FW-6263.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
gnbm
marked this pull request as ready for review
November 4, 2026 14:04
gnbm
requested review from
ShaneK and
brandyscarney
and removed request for
a team and
brandyscarney
November 4, 2026 14:04
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
This PR removes
@ionic/storageand uses@capacitor/preferencesinstead.The keys stay the same (
ion_did_tutorial,hasLoggedIn,username), so the app logic does not change.Only the place where the data is saved changes.
Why
@ionic/storage, the data goes to IndexedDB and we need to callcreate()before reading it. Because of this, it was not possible to set the tutorial flag from a test in a reliable way.@ionic/storageis also in the way for being deprecated, so this is suppose to replace it beforehandlocalStorageand the read is simple and direct. A test can set the key and the app will see it every time.Changes
@ionic/storage,@ionic/storage-angularand theIonicStorageModulesetup inmain.ts.localforagefromallowedCommonJsDependenciesinangular.json, it was only needed by@ionic/storage.user.service.ts,check-tutorial.guard.ts,tutorial.tsandapp.component.tsnow usePreferences.UserServiceandcheckTutorialGuard, and updated the tests for the tutorial page and the app component.npx cap sync, so theios/andandroid/folders have the new plugin.Things to know
@ionic/storage) is not needed anymore after this.How I tested
npm run lint,npm run build -- --configuration=productionandnpm test -- --configuration=ciall pass.